(function() {
  var $;
  $ = jQuery;
  $.fn.deserializeForm = function(model) {
    return this.each(function() {
      var form, key, _i, _len, _ref, _results;
      form = $(this);
      _ref = model.constructor.attributes;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        key = _ref[_i];
        _results.push(($("input[name=" + key + "], textarea[name=" + key + "], select[name=" + key + "]", form)).val(model[key]));
      }
      return _results;
    });
  };
}).call(this);
